package service

import (
	"choujiang/common/models"
	"choujiang/common/db"
	"fmt"
)

func GetMessages(gameId string) []model.Messages {
	messages := make([]model.Messages, 0)
	err := db.MysqlEngine.Where("status = ?", 1).Desc("order").Find(&messages)
	if err != nil {
		fmt.Printf("GetMessages err ---------%v", err)
	}
	return messages
}
